<?php
set_include_path(".;C:/wamp/www/TEAMEKA/application/Offline");
require 'config.php';
require 'EKADBPDO.php';
set_include_path(".;C:/wamp/www/TEAMEKA/application/Online/Controller");
$controller_filenames = glob("C:/wamp/www/TEAMEKA/application/Online/Controller/*.php");
for ($i = count($controller_filenames)-1; $i >= 0; $i--)
{
	require basename($controller_filenames[$i]);
}
set_include_path(".;C:/wamp/www/TEAMEKA/application/Online/Model");
$model_filenames = glob("C:/wamp/www/TEAMEKA/application/Online/Model/*.php");
for ($i = count($model_filenames)-1; $i >= 0; $i--)
{
	require basename($model_filenames[$i]);
}
set_include_path(".;C:/wamp/www/TEAMEKA/application/Online/Model/Table");
$model_table_filenames = glob("C:/wamp/www/TEAMEKA/application/Online/Model/Table/*.php");
for ($i = count($model_table_filenames)-1; $i >= 0; $i--)
{
	require basename($model_table_filenames[$i]);
}
try
{
	Controller_Template::$db = new EKADBPDO(DB_TYPE.':host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PWD);
}
catch (PDOException $e)
{
	echo 'Error: ', $e->__toString();
}